Supercharge Your Applications with GraalVM by A B Vijay Kumar

Supercharge Your Applications with GraalVM by A B Vijay Kumar

Author:A B Vijay Kumar
Language: eng
Format: epub
Publisher: Packt Publishing Pvt Ltd
Published: 2021-05-28T00:00:00+00:00


Above the Truffle layer, we have the guest language. This is JavaScript, R, Ruby, and others that implement the Truffle Language Implementation framework. Finally, we have the application that runs on top of the guest language runtime. In most cases, application developers don't have to worry about changing the code to run on GraalVM. Truffle makes it seamless by providing a layer in between. The following diagram shows a detailed stack view of the GraalVM and Truffle ecosystem:

Figure 6.2 – Truffle and Graal detailed stack view

This diagram is a simple representation of how Truffle acts as a layer between non-JVM languages and GraalVM. Let's understand this in detail.

Truffle provides the API that the individual interpreters implement to rewrite the code into ASTs. The AST representation is later converted to a Graal intermediate representation for Graal to execute and also optimize just in time. The guest languages run on top of the Truffle interpreter implementations of the respective guest languages.

Let's look at how these various layers interact and how Truffle helps the guest language to run on GraalVM.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.